//
//  HCAssetModel.h
//  ChatForHot
//
//  Created by wr on 2018/10/15.
//  Copyright © 2018年 FLY. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
 *  资源的类型
 */
typedef NS_ENUM(NSInteger, HCAssetModelMediaType) {
    HCAssetModelMediaTypePhoto = 0,
    HCAssetModelMediaTypeLivePhoto,
    HCAssetModelMediaTypeVideo,
    HCAssetModelMediaTypeAudio
};

NS_ASSUME_NONNULL_BEGIN

@interface HCAssetModel : NSObject

@property (nonatomic, strong) id asset; // PHAsset  或者  ALAsset  资源
@property (nonatomic, assign) HCAssetModelMediaType mediaType;
@property (nonatomic, copy) NSString *timeLength;

//@property (nonatomic,strong) NSString *photoUrl;
//@property (nonatomic,assign) float percent;
@property (nonatomic,assign) BOOL isUping;
@property (nonatomic,assign) BOOL uploadSuccess;

/// 用一个PHAsset/ALAsset实例，初始化一个照片模型
+ (instancetype)modelWithAsset:(id)asset type:(HCAssetModelMediaType)mediaType;
+ (instancetype)modelWithAsset:(id)asset type:(HCAssetModelMediaType)mediaType timeLength:(NSString *)timeLength;
@end


@interface HCAlbumModel : NSObject

@property (nonatomic, strong) NSString *name;        ///相册的名字
@property (nonatomic, assign) NSInteger count;       ///资源的数量
@property (nonatomic, strong) UIImage *coverImage; //封面图片
@property (nonatomic, strong) id album; // PHAssetCollection  或者 ALAssetsGroup

@end
NS_ASSUME_NONNULL_END
